package 如何优雅的在java中统计代码块耗时;

/**
 * @author vivi20
 * @ClassName Test
 * @description: TODO
 * @Date 2020/3/28 14:16
 * @Vertion 1.0
 */
public class Test {
    public static void main(String[] args) {
        int i = 5,j=0;
        if(j == 0){
            i++;
        }else {
            i--;
        }
        System.out.println(i);
    }
}
